home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 February: Tool Chest / Apple Developer CD Series Tool Chest February 1996 (Apple Computer)(1996).iso / Tool Chest / Development Tools & Languages / Macintosh Common Lisp Related / interfaces / AOCE folder / OCEStandardMail.lisp < prev    next >
Encoding:
Text File  |  1994-09-12  |  26.3 KB  |  660 lines  |  [TEXT/CCL2]

  1.  
  2. (in-package :TRAPS)             ; ***********************************************************
  3. ; Created: Monday, November 8, 1993 12:03PM
  4. ;  OCEStandardMail.p
  5. ;  Pascal Interface to the Macintosh Libraries
  6. ;   Copyright Apple Computer, Inc. 1990-1993
  7. ;   All rights reserved
  8. ; ***********************************************************
  9.  
  10. ; $IFC UNDEFINED UsingIncludes
  11. ; $SETC UsingIncludes:= 0
  12. ; $ENDC
  13.  
  14. ; $IFC NOT UsingIncludes
  15.  
  16. ; $ENDC
  17.  
  18. ; $IFC UNDEFINED UsingOCEStandardMail
  19. ; $SETC UsingOCEStandardMail:= 1
  20.  
  21. ; $I+
  22. ; $SETC OCEStandardMailIncludes:= UsingIncludes
  23. ; $SETC UsingIncludes:= 1
  24.  
  25. ; $IFC UNDEFINED UsingAppleEvents
  26.  
  27. (require-interface 'APPLEEVENTS); $I $$Shell(PInterfaces)AppleEvents.p
  28. ; $ENDC
  29.  
  30. ; $IFC UNDEFINED UsingFiles
  31.  
  32. (require-interface 'FILES)      ; $I $$Shell(PInterfaces)Files.p
  33. ; $ENDC
  34.  
  35. ; $IFC UNDEFINED UsingOCEAuthDir
  36. ; $I OCEAuthDir.p
  37. ; $ENDC
  38.  
  39. ; $IFC UNDEFINED UsingOCEMail
  40. ; $I OCEMail.p
  41. ; $ENDC
  42.  
  43. ; $IFC UNDEFINED UsingWindows
  44.  
  45. (require-interface 'WINDOWS)    ; $I $$Shell(PInterfaces)Windows.p
  46. ; $ENDC
  47.  
  48. ; $IFC UNDEFINED UsingDialogs
  49.  
  50. (require-interface 'DIALOGS)    ; $I $$Shell(PInterfaces)Dialogs.p
  51. ; $ENDC
  52.  
  53. ; $SETC UsingIncludes:= OCEStandardMailIncludes
  54.  
  55. (defconstant $gestaltSMPMailerVersion :|malr|)
  56. (defconstant $gestaltSMPSPSendLetterVersion :|spsl|)
  57.  
  58. (defconstant $kSMPNativeFormatName :|natv|)
  59.  
  60. (defconstant $kSMPVersion 1)
  61.  
  62. (defrecord LetterSpec 
  63.    (spec (:ARRAY :SIGNED-LONG (- 3 1 -1)))
  64.    )
  65.  
  66. (defconstant $typeLetterSpec :|lttr|)
  67.  
  68. ;  Wildcard used for filtering letter types. 
  69.  
  70. (defconstant $FilterAnyLetter :|ltr*|)
  71. (defconstant $FilterAppleLetterContent :|ltc*|)
  72. (defconstant $FilterImageContent :|lti*|)
  73.  
  74. (defrecord LetterDescriptor 
  75.    (onDisk :BOOLEAN)
  76.    (:variant 
  77.       ((fileSpec :FSSPEC))
  78.       ((mailboxSpec :LETTERSPEC))
  79.       ))
  80.  
  81. ; SMPPSendAs values.  You may add the following values together to determine how the
  82. ; file is sent, but you may not set both kSMPSendAsEnclosureMask and kSMPSendFileOnlyMask.  This
  83. ; will allow you to send the letter as an image so that it will work with fax gateways
  84. ; and send as an enclosure as well.
  85.  
  86. (defconstant $kSMPSendAsEnclosureBit 0);  Appears as letter with enclosures 
  87. (defconstant $kSMPSendFileOnlyBit 1);  Appears as a file in mailbox. 
  88. (defconstant $kSMPSendAsImageBit 2);  Content imaged in letter 
  89.  
  90. ;  Values of SMPPSendAs 
  91. (defconstant $kSMPSendAsEnclosureMask #X1); 1<<kSMPSendAsEnclosureBit
  92. (defconstant $kSMPSendFileOnlyMask #X2); 1<<kSMPSendFileOnlyBit
  93. (defconstant $kSMPSendAsImageMask #X4); 1<<kSMPSendAsImageBit
  94.  
  95. (def-mactype :SMPPSENDAS (find-mactype :UNSIGNED-BYTE))
  96.  
  97. ;  Send Package Structures 
  98.  
  99. (def-mactype :SMPDRAWIMAGEPROCPTR (find-mactype :POINTER))
  100. ;  FUNCTION SMPDrawImageProcPtr(refcon: LONGINT; inColor: BOOLEAN): void;
  101.  
  102. (defrecord SMPRecipientDescriptor 
  103.    (next (:POINTER :SMPRECIPIENTDESCRIPTOR));   Q-Link. 
  104.    (result :SIGNED-INTEGER)     ;   result code when using the object. 
  105.    (recipient (:POINTER :OCEPACKEDRECIPIENT));   Pointer to a Packed Address. 
  106.    (size :SIGNED-LONG)          ;   length of recipient in bytes. 
  107.    (theAddress :OCERECIPIENT)   ;   structure points into recipient and theRID. 
  108.    (theRID :RECORDID)           ;   structure points into recipient. 
  109.    )
  110.  
  111. (def-mactype :SMPRECIPIENTDESCRIPTORPTR (find-mactype :POINTER))
  112.  
  113. (defrecord SMPEnclosureDescriptor 
  114.    (next (:POINTER :SMPENCLOSUREDESCRIPTOR))
  115.    (result :SIGNED-INTEGER)
  116.    (fileSpec :FSSPEC)
  117.    (fileCreator :OSTYPE)        ;   Creator of this enclosure. 
  118.    (fileType :OSTYPE)           ;   File Type of this enclosure. 
  119.    )
  120.  
  121. (def-mactype :SMPENCLOSUREDESCRIPTORPTR (find-mactype :POINTER))
  122.  
  123. (defrecord SMPLetterPB 
  124.    (result :SIGNED-INTEGER)     ;  result of operation 
  125.    (subject (:POINTER :RSTRING));  RString 
  126.    (senderIdentity :SIGNED-LONG);  Letter is sent from this Identity 
  127.    (toList (:POINTER :SMPRECIPIENTDESCRIPTOR));  Pointer to linked list 
  128.    (ccList (:POINTER :SMPRECIPIENTDESCRIPTOR));  Pointer to linked list 
  129.    (bccList (:POINTER :SMPRECIPIENTDESCRIPTOR));  Pointer to linked list 
  130.    (script :SIGNED-INTEGER)     ;  Identifier for language 
  131.    (textSize :SIZE)             ;  length of body data 
  132.    (textBuffer :POINTER)        ;  body of the letter 
  133.    (sendAs :UNSIGNED-BYTE)      ;  Send as Letter, Enclosure, Image 
  134.    (padByte :UNSIGNED-BYTE)
  135.    (enclosures (:POINTER :SMPENCLOSUREDESCRIPTOR));  files to be enclosed 
  136.    (drawImageProc :POINTER)     ;  For imaging 
  137.    (imageRefCon :SIGNED-LONG)   ;  For imaging 
  138.  
  139. ; ERROR!! Record field SUPPORTSCOLOR declared PACKED BOOLEAN !
  140.    (supportsColor :BOOLEAN)     ;  For imaging - set to true if you application supports color imaging 
  141.    )
  142.  
  143. (def-mactype :SMPLETTERPBPTR (find-mactype :POINTER))
  144.  
  145. (defconstant $kSMPAppMustHandleEventBit 0)
  146. (defconstant $kSMPAppShouldIgnoreEventBit 1)
  147. (defconstant $kSMPContractedBit 2)
  148. (defconstant $kSMPExpandedBit 3)
  149. (defconstant $kSMPMailerBecomesTargetBit 4)
  150. (defconstant $kSMPAppBecomesTargetBit 5)
  151. (defconstant $kSMPCursorOverMailerBit 6)
  152. (defconstant $kSMPCreateCopyWindowBit 7)
  153. (defconstant $kSMPDisposeCopyWindowBit 8)
  154. ;  Values of SMPMailerResult 
  155. (defconstant $kSMPAppMustHandleEventMask #X1); 1<<kSMPAppMustHandleEventBit
  156. (defconstant $kSMPAppShouldIgnoreEventMask #X2); 1<<kSMPAppShouldIgnoreEventBit
  157. (defconstant $kSMPContractedMask #X4); 1<<kSMPContractedBit
  158. (defconstant $kSMPExpandedMask #X8); 1<<kSMPExpandedBit
  159. (defconstant $kSMPMailerBecomesTargetMask #X10); 1<<kSMPMailerBecomesTargetBit
  160. (defconstant $kSMPAppBecomesTargetMask #X20); 1<<kSMPAppBecomesTargetBit
  161. (defconstant $kSMPCursorOverMailerMask #X40); 1<<kSMPCursorOverMailerBit
  162. (defconstant $kSMPCreateCopyWindowMask #X80); 1<<kSMPCreateCopyWindowBit
  163. (defconstant $kSMPDisposeCopyWindowMask #X100); 1<<kSMPDisposeCopyWindowBit
  164.  
  165. (def-mactype :SMPMAILERRESULT (find-mactype :SIGNED-LONG))
  166.  
  167. ;  Values of SMPMailerComponent
  168. (defconstant $kSMPOther -1)
  169. (defconstant $kSMPFrom 32)
  170. (defconstant $kSMPTo 20)
  171. (defconstant $kSMPRegarding 22)
  172. (defconstant $kSMPSendDateTime 29)
  173. (defconstant $kSMPAttachments 26)
  174. (defconstant $kSMPAddressOMatic 16)
  175.  
  176. (def-mactype :SMPMAILERCOMPONENT (find-mactype :SIGNED-LONG))
  177.  
  178. (defconstant $kSMPToAddress #$KMAILTOBIT)
  179. (defconstant $kSMPCCAddress #$KMAILCCBIT)
  180. (defconstant $kSMPBCCAddress #$KMAILBCCBIT)
  181.  
  182. (def-mactype :SMPADDRESSTYPE (find-mactype :SIGNED-INTEGER))
  183.  
  184. (defconstant $kSMPUndoCommand 0)
  185. (defconstant $kSMPCutCommand 1)
  186. (defconstant $kSMPCopyCommand 2)
  187. (defconstant $kSMPPasteCommand 3)
  188. (defconstant $kSMPClearCommand 4)
  189. (defconstant $kSMPSelectAllCommand 5)
  190.  
  191. (def-mactype :SMPEDITCOMMAND (find-mactype :SIGNED-INTEGER))
  192.  
  193. (defconstant $kSMPUndoDisabled 0)
  194. (defconstant $kSMPAppMayUndo 1)
  195. (defconstant $kSMPMailerUndo 2)
  196.  
  197. (def-mactype :SMPUNDOSTATE (find-mactype :SIGNED-INTEGER))
  198.  
  199. ; SMPSendFormatMask:
  200. ; Bitfield indicating which combinations of formats are included in,
  201. ; should be included or, or can be included in a letter.
  202.  
  203. (defconstant $kSMPNativeBit 0)
  204. (defconstant $kSMPImageBit 1)
  205. (defconstant $kSMPStandardInterchangeBit 2)
  206.  
  207. ;  Values of SMPSendFormatMask 
  208.  
  209. (defconstant $kSMPNativeMask #X1); 1<<kSMPNativeBit
  210. (defconstant $kSMPImageMask #X2); 1<<kSMPImageBit
  211. (defconstant $kSMPStandardInterchangeMask #X4); 1<<kSMPStandardInterchangeBit
  212.  
  213. (def-mactype :SMPSENDFORMATMASK (find-mactype :SIGNED-LONG))
  214.  
  215. ;     Pseudo-events passed to the clients filter proc for initialization and cleanup.
  216.  
  217. (defconstant $kSMPSendOptionsStart -1)
  218. (defconstant $kSMPSendOptionsEnd -2)
  219.  
  220. ; SMPSendFormatMask:
  221. ; Structure describing the format of a letter.  If kSMPNativeMask bit is set, the whichNativeFormat field indicates which of the client-defined formats to use.
  222.  
  223. (defrecord SMPSendFormat 
  224.    (whichFormats :SIGNED-LONG)
  225.    (whichNativeFormat :SIGNED-INTEGER);  0 based 
  226.    )
  227.  
  228. (defrecord SMPLetterInfo 
  229.    (letterCreator :OSTYPE)
  230.    (letterType :OSTYPE)
  231.    (subject :RSTRING32)
  232.    (sender :RSTRING32)
  233.    )
  234.  
  235. (defconstant $kSMPSave 0)
  236. (defconstant $kSMPSaveAs 1)
  237. (defconstant $kSMPSaveACopy 2)
  238.  
  239. (def-mactype :SMPSAVETYPE (find-mactype :SIGNED-INTEGER))
  240.  
  241. (def-mactype :FRONTWINDOWPROCPTR (find-mactype :POINTER))
  242. ;  FUNCTION FrontWindowProcPtr(clientData: LONGINT): WindowPtr;
  243.  
  244. (def-mactype :PREPAREMAILERFORDRAWINGPROCPTR (find-mactype :POINTER))
  245. ;  FUNCTION PrepareMailerForDrawingProcPtr(
  246. ;         window: WindowPtr; clientData: LONGINT): void;
  247.  
  248. (def-mactype :SENDOPTIONSFILTERPROC (find-mactype :POINTER))
  249. ;  FUNCTION SendOptionsFilterProc(theDialog: DialogPtr; VAR theEvent: EventRecord;
  250. ;         itemHit: INTEGER; clientData: LONGINT): BOOLEAN;
  251.  
  252. (defconstant $kSMPGetDimensions 4700)
  253. (defconstant $kSMPNewMailer 4701)
  254. (defconstant $kSMPDisposeMailer 4702)
  255. (defconstant $kSMPMailerEvent 4703)
  256. (defconstant $kSMPMailerEditCommand 4704)
  257. (defconstant $kSMPMailerForward 4705)
  258. (defconstant $kSMPMailerReply 4706)
  259. (defconstant $kSMPGetMailerState 4707)
  260. (defconstant $kSMPPrepareCoverPages 4708)
  261. (defconstant $kSMPDrawNthCoverPage 4709)
  262. (defconstant $kSMPBeginSave 4710)
  263. (defconstant $kSMPBeginSend 4711)
  264. (defconstant $kSMPOpenLetter 4712)
  265. (defconstant $kSMPDrawMailer 4713)
  266. (defconstant $kSMPMoveMailer 4714)
  267. (defconstant $kSMPSetSubject 4715)
  268. (defconstant $kSMPSetFromIdentity 4716)
  269. (defconstant $kSMPAddAddress 4717)
  270. (defconstant $kSMPAddAttachment 4718)
  271. (defconstant $kSMPContentChanged 4719)
  272. (defconstant $kSMPEndSave 4720)
  273. (defconstant $kSMPEndSend 4721)
  274. (defconstant $kSMPExpandOrContract 4722)
  275. (defconstant $kSMPBecomeTarget 4723)
  276. (defconstant $kSMPGetTabInfo 4724)
  277. (defconstant $kSMPClearUndo 4725)
  278. (defconstant $kSMPAttachDialog 4726)
  279. (defconstant $kSMPGetComponentSize 4727)
  280. (defconstant $kSMPGetComponentInfo 4728)
  281. (defconstant $kSMPGetListItemInfo 4729)
  282. (defconstant $kSMPAddContent 4730)
  283. (defconstant $kSMPReadContent 4731)
  284. (defconstant $kSMPGetFontNameFromLetter 4732)
  285. (defconstant $kSMPAddMainEnclosure 4733)
  286. (defconstant $kSMPGetMainEnclosureFSSpec 4734)
  287. (defconstant $kSMPAddBlock 4735)
  288. (defconstant $kSMPReadBlock 4736)
  289. (defconstant $kSMPEnumerateBlocks 4737)
  290. (defconstant $kSMPImage 4738)
  291. (defconstant $kSMPInitMailer 4741)
  292. (defconstant $kSMPGetNextLetter 4742)
  293. (defconstant $kSMPPrepareToClose 4743)
  294. (defconstant $kSMPCloseOptionsDialog 4744)
  295. (defconstant $kSMPPrepareToChange 4745)
  296. (defconstant $kSMPGetLetterInfo 4746)
  297. (defconstant $kSMPTagDialog 4747)
  298. (defconstant $kSMPSendOptionsDialog 5000)
  299.  
  300. (defrecord SMPMailerState 
  301.    (mailerCount :SIGNED-INTEGER)
  302.    (currentMailer :SIGNED-INTEGER)
  303.    (upperLeft :POINT)
  304.    (hasBeenReceived :BOOLEAN)
  305.    (isTarget :BOOLEAN)
  306.    (isExpanded :BOOLEAN)
  307.    (canMoveToTrash :BOOLEAN)
  308.    (canTag :BOOLEAN)
  309. ; padByte2: Byte;
  310.    (changeCount :SIGNED-LONG)
  311.    (targetComponent :SIGNED-LONG)
  312.    (canCut :BOOLEAN)
  313.    (canCopy :BOOLEAN)
  314.    (canPaste :BOOLEAN)
  315.    (canClear :BOOLEAN)
  316.    (canSelectAll :BOOLEAN)
  317. ; padByte3: Byte;
  318.    (undoState :SIGNED-INTEGER)
  319.    (undoWhat (:STRING 63))
  320.    )
  321.  
  322. (defrecord SMPSendOptions 
  323.    (signWhenSent :BOOLEAN)
  324.  
  325. ; ERROR!! Record field PRIORITY declared Non-PACKED BYTE !
  326.    (priority :UNSIGNED-BYTE)
  327.    )
  328.  
  329. (def-mactype :SMPSENDOPTIONSPTR (find-mactype :POINTER))
  330. (def-mactype :SMPSENDOPTIONSHANDLE (find-mactype :HANDLE))
  331.  
  332. (defrecord SMPCloseOptions 
  333.    (moveToTrash :BOOLEAN)
  334.    (addTag :BOOLEAN)
  335.    (tag :RSTRING32)
  336.    )
  337.  
  338. (def-mactype :SMPCLOSEOPTIONSPTR (find-mactype :POINTER))
  339.  
  340. ; ----------------------------------------------------------------------------------------
  341. ;     Send Package Routines
  342. ; ----------------------------------------------------------------------------------------
  343.  
  344. (defconstant $kSMPSendLetter 500)
  345. (defconstant $kSMPResolveToRecipient 1100)
  346.  
  347. (defconstant $kSMPNewPage 2100)
  348. (defconstant $kSMPImageErr 2101)
  349.  
  350.  
  351. (deftrap _smpsendletter ((theletter (:pointer :smpletterpb)))
  352.    (:stack :signed-integer)
  353.    (:stack-trap #xAA5D :d0 (+ (ash 2 16) 500) theletter))
  354.  
  355.  
  356. (deftrap _smpnewpage ((newheader (:pointer :opencpicparams)))
  357.    (:stack :signed-integer)
  358.    (:stack-trap #xAA5D :d0 (+ (ash 2 16) 2100) newheader))
  359.  
  360.  
  361. (deftrap _smpimageerr nil
  362.    (:stack :signed-integer)
  363.    (:stack-trap #xAA5D :d0 (+ (ash 0 16) 2101)))
  364.  
  365.  
  366. (deftrap _smpresolvetorecipient ((dsspec (:pointer :packeddsspec)) (recipientlist (:pointer (:pointer :smprecipientdescriptor))) (identity :signed-long))
  367.    (:stack :signed-integer)
  368.    (:stack-trap #xAA5D :d0 (+ (ash 6 16) 1100) dsspec recipientlist identity))
  369.  
  370.  
  371. (deftrap _smpinitmailer ((mailerversion :signed-long))
  372.    (:stack :signed-integer)
  373.    (:stack-trap #xAA5D :d0 (+ (ash 2 16) 4741) mailerversion))
  374.  
  375.  
  376. (deftrap _smpgetdimensions ((width (:pointer :signed-integer)) (contractedheight (:pointer :signed-integer)) (expandedheight (:pointer :signed-integer)))
  377.    (:stack :signed-integer)
  378.    (:stack-trap #xAA5D :d0 (+ (ash 6 16) 4700) width contractedheight expandedheight))
  379.  
  380.  
  381. (deftrap _smpgettabinfo ((firsttab (:pointer :signed-long)) (lasttab (:pointer :signed-long)))
  382.    (:stack :signed-integer)
  383.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 4724) firsttab lasttab))
  384.  
  385.  
  386. (deftrap _smpnewmailer ((window (:pointer :grafport)) (upperleft :point) (cancontract :boolean) (initiallyexpanded :boolean) (identity :signed-long) (preparemailerfordrawingcb :pointer) (clientdata :signed-long))
  387.    (:stack :signed-integer)
  388.    (:stack-trap #xAA5D :d0 (+ (ash 12 16) 4701) window upperleft cancontract initiallyexpanded identity preparemailerfordrawingcb clientdata))
  389.  
  390.  
  391. (deftrap _smppreparetoclose ((window (:pointer :grafport)))
  392.    (:stack :signed-integer)
  393.    (:stack-trap #xAA5D :d0 (+ (ash 2 16) 4743) window))
  394.  
  395.  
  396. (deftrap _smpcloseoptionsdialog ((window (:pointer :grafport)) (closeoptions (:pointer :smpcloseoptions)))
  397.    (:stack :signed-integer)
  398.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 4744) window closeoptions))
  399.  
  400.  
  401. (deftrap _smptagdialog ((window (:pointer :grafport)) (thetag (:pointer :rstring32)))
  402.    (:stack :signed-integer)
  403.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 4747) window thetag))
  404.  
  405.  
  406. (deftrap _smpdisposemailer ((window (:pointer :grafport)) (closeoptions (:pointer :smpcloseoptions)))
  407.    (:stack :signed-integer)
  408.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 4702) window closeoptions))
  409.  
  410.  
  411. (deftrap _smpmailerevent ((event :eventrecord) (whathappened (:pointer :signed-long)) (frontwindowcb :pointer) (clientdata :signed-long))
  412.    (:stack :signed-integer)
  413.    (:stack-trap #xAA5D :d0 (+ (ash 8 16) 4703) event whathappened frontwindowcb clientdata))
  414.  
  415.  
  416. (deftrap _smpclearundo ((window (:pointer :grafport)))
  417.    (:stack :signed-integer)
  418.    (:stack-trap #xAA5D :d0 (+ (ash 2 16) 4725) window))
  419.  
  420.  
  421. (deftrap _smpmailereditcommand ((window (:pointer :grafport)) (command :signed-integer) (whathappened (:pointer :signed-long)))
  422.    (:stack :signed-integer)
  423.    (:stack-trap #xAA5D :d0 (+ (ash 5 16) 4704) window command whathappened))
  424.  
  425.  
  426. (deftrap _smpmailerforward ((window (:pointer :grafport)) (from :signed-long))
  427.    (:stack :signed-integer)
  428.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 4705) window from))
  429.  
  430.  
  431. (deftrap _smpmailerreply ((originalletter (:pointer :grafport)) (newletter (:pointer :grafport)) (replytoall :boolean) (upperleft :point) (cancontract :boolean) (initiallyexpanded :boolean) (identity :signed-long) (preparemailerfordrawingcb :pointer) (clientdata :signed-long))
  432.    (:stack :signed-integer)
  433.    (:stack-trap #xAA5D :d0 (+ (ash 15 16) 4706) originalletter newletter replytoall upperleft cancontract initiallyexpanded identity preparemailerfordrawingcb clientdata))
  434.  
  435.  
  436. (deftrap _smpgetmailerstate ((window (:pointer :grafport)) (itsstate (:pointer :smpmailerstate)))
  437.    (:stack :signed-integer)
  438.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 4707) window itsstate))
  439.  
  440.  
  441. (deftrap _smpsendoptionsdialog ((window (:pointer :grafport)) (documentname (:string 255)) (nativeformatnames (:pointer (:pointer (:string 255)))) (namecount :signed-integer) (cansend :signed-long) (currentformat (:pointer :smpsendformat)) (filterproc :pointer) (clientdata :signed-long) (shouldsend (:pointer :smpsendformat)) (sendoptions (:pointer :smpsendoptions)))
  442.    (:stack :signed-integer)
  443.    (:stack-trap #xAA5D :d0 (+ (ash 19 16) 5000) window documentname nativeformatnames namecount cansend currentformat filterproc clientdata shouldsend sendoptions))
  444.  
  445.  
  446. (deftrap _smppreparecoverpages ((window (:pointer :grafport)) (pagecount (:pointer :signed-integer)))
  447.    (:stack :signed-integer)
  448.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 4708) window pagecount))
  449.  
  450.  
  451. (deftrap _smpdrawnthcoverpage ((window (:pointer :grafport)) (pagenumber :signed-integer) (donedrawingcoverpages :boolean))
  452.    (:stack :signed-integer)
  453.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 4709) window pagenumber donedrawingcoverpages))
  454.  
  455.  
  456. (deftrap _smppreparetochange ((window (:pointer :grafport)))
  457.    (:stack :signed-integer)
  458.    (:stack-trap #xAA5D :d0 (+ (ash 2 16) 4745) window))
  459.  
  460.  
  461. (deftrap _smpcontentchanged ((window (:pointer :grafport)))
  462.    (:stack :signed-integer)
  463.    (:stack-trap #xAA5D :d0 (+ (ash 2 16) 4719) window))
  464.  
  465.  
  466. (deftrap _smpbeginsave ((window (:pointer :grafport)) (diskletter :fsspec) (creator :ostype) (filetype :ostype) (savetype :signed-integer) (mustaddcontent (:pointer :boolean)))
  467.    (:stack :signed-integer)
  468.    (:stack-trap #xAA5D :d0 (+ (ash 11 16) 4710) window diskletter creator filetype savetype mustaddcontent))
  469.  
  470.  
  471. (deftrap _smpendsave ((window (:pointer :grafport)) (oktosave :boolean))
  472.    (:stack :signed-integer)
  473.    (:stack-trap #xAA5D :d0 (+ (ash 3 16) 4720) window oktosave))
  474.  
  475.  
  476. (deftrap _smpbeginsend ((window (:pointer :grafport)) (creator :ostype) (filetype :ostype) (sendoptions (:pointer :smpsendoptions)) (mustaddcontent (:pointer :boolean)))
  477.    (:stack :signed-integer)
  478.    (:stack-trap #xAA5D :d0 (+ (ash 10 16) 4711) window creator filetype sendoptions mustaddcontent))
  479.  
  480.  
  481. (deftrap _smpendsend ((window (:pointer :grafport)) (oktosend :boolean))
  482.    (:stack :signed-integer)
  483.    (:stack-trap #xAA5D :d0 (+ (ash 3 16) 4721) window oktosend))
  484.  
  485.  
  486. (deftrap _smpopenletter ((letter :letterdescriptor) (window (:pointer :grafport)) (upperleft :point) (cancontract :boolean) (initiallyexpanded :boolean) (preparemailerfordrawingcb :pointer) (clientdata :signed-long))
  487.    (:stack :signed-integer)
  488.    (:stack-trap #xAA5D :d0 (+ (ash 12 16) 4712) letter window upperleft cancontract initiallyexpanded preparemailerfordrawingcb clientdata))
  489.  
  490.  
  491. (deftrap _smpaddmainenclosure ((window (:pointer :grafport)) (enclosure :fsspec))
  492.    (:stack :signed-integer)
  493.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 4733) window enclosure))
  494.  
  495.  
  496. (deftrap _smpgetmainenclosurefsspec ((window (:pointer :grafport)) (enclosuredir (:pointer :fsspec)))
  497.    (:stack :signed-integer)
  498.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 4734) window enclosuredir))
  499.  
  500.  
  501. (deftrap _smpaddcontent ((window (:pointer :grafport)) (segmenttype :signed-integer) (appendflag :boolean) (buffer :pointer) (buffersize :signed-long) (textscrap :stscrpptr) (startnewscript :boolean) (script :signed-integer))
  502.    (:stack :signed-integer)
  503.    (:stack-trap #xAA5D :d0 (+ (ash 12 16) 4730) window segmenttype appendflag buffer buffersize textscrap startnewscript script))
  504.  
  505.  
  506. (deftrap _smpreadcontent ((window (:pointer :grafport)) (segmenttypemask :signed-integer) (buffer :pointer) (buffersize :signed-long) (datasize (:pointer :signed-long)) (textscrap (:pointer :stscrprec)) (script (:pointer :signed-integer)) (segmenttype (:pointer :signed-integer)) (endofscript (:pointer :boolean)) (endofsegment (:pointer :boolean)) (endofcontent (:pointer :boolean)) (segmentlength (:pointer :signed-long)) (segmentid (:pointer :signed-long)))
  507.    (:stack :signed-integer)
  508.    (:stack-trap #xAA5D :d0 (+ (ash 25 16) 4731) window segmenttypemask buffer buffersize datasize textscrap script segmenttype endofscript endofsegment endofcontent segmentlength segmentid))
  509.  
  510.  
  511. (deftrap _smpgetfontnamefromletter ((window (:pointer :grafport)) (fontnum :signed-integer) (fontname (:string 255)) (donewithfonttable :boolean))
  512.    (:stack :signed-integer)
  513.    (:stack-trap #xAA5D :d0 (+ (ash 6 16) 4732) window fontnum fontname donewithfonttable))
  514.  
  515.  
  516. (deftrap _smpaddblock ((window (:pointer :grafport)) (blocktype :ocecreatortype) (append :boolean) (buffer :pointer) (buffersize :signed-long) (mode :signed-integer) (offset :signed-long))
  517.    (:stack :signed-integer)
  518.    (:stack-trap #xAA5D :d0 (+ (ash 12 16) 4735) window blocktype append buffer buffersize mode offset))
  519.  
  520.  
  521. (deftrap _smpreadblock ((window (:pointer :grafport)) (blocktype :ocecreatortype) (blockindex :signed-integer) (buffer :pointer) (buffersize :signed-long) (dataoffset :signed-long) (datasize (:pointer :signed-long)) (endofblock (:pointer :boolean)) (remaining (:pointer :signed-long)))
  522.    (:stack :signed-integer)
  523.    (:stack-trap #xAA5D :d0 (+ (ash 17 16) 4736) window blocktype blockindex buffer buffersize dataoffset datasize endofblock remaining))
  524.  
  525.  
  526. (deftrap _smpenumerateblocks ((window (:pointer :grafport)) (startindex :signed-integer) (buffer :pointer) (buffersize :signed-long) (datasize (:pointer :signed-long)) (nextindex (:pointer :signed-integer)) (more (:pointer :boolean)))
  527.    (:stack :signed-integer)
  528.    (:stack-trap #xAA5D :d0 (+ (ash 13 16) 4737) window startindex buffer buffersize datasize nextindex more))
  529.  
  530.  
  531. (deftrap _smpdrawmailer ((window (:pointer :grafport)))
  532.    (:stack :signed-integer)
  533.    (:stack-trap #xAA5D :d0 (+ (ash 2 16) 4713) window))
  534.  
  535.  
  536. (deftrap _smpsetsubject ((window (:pointer :grafport)) (text :rstring))
  537.    (:stack :signed-integer)
  538.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 4715) window text))
  539.  
  540.  
  541. (deftrap _smpsetfromidentity ((window (:pointer :grafport)) (from :signed-long))
  542.    (:stack :signed-integer)
  543.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 4716) window from))
  544.  
  545.  
  546. (deftrap _smpaddaddress ((window (:pointer :grafport)) (addrtype :signed-integer) (address (:pointer :ocepackedrecipient)))
  547.    (:stack :signed-integer)
  548.    (:stack-trap #xAA5D :d0 (+ (ash 5 16) 4717) window addrtype address))
  549.  
  550.  
  551. (deftrap _smpaddattachment ((window (:pointer :grafport)) (attachment :fsspec))
  552.    (:stack :signed-integer)
  553.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 4718) window attachment))
  554.  
  555.  
  556. (deftrap _smpattachdialog ((window (:pointer :grafport)))
  557.    (:stack :signed-integer)
  558.    (:stack-trap #xAA5D :d0 (+ (ash 2 16) 4726) window))
  559.  
  560.  
  561. (deftrap _smpexpandorcontract ((window (:pointer :grafport)) (expand :boolean))
  562.    (:stack :signed-integer)
  563.    (:stack-trap #xAA5D :d0 (+ (ash 3 16) 4722) window expand))
  564.  
  565.  
  566. (deftrap _smpmovemailer ((window (:pointer :grafport)) (dh :signed-integer) (dv :signed-integer))
  567.    (:stack :signed-integer)
  568.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 4714) window dh dv))
  569.  
  570.  
  571. (deftrap _smpbecometarget ((window (:pointer :grafport)) (becometarget :boolean) (whichfield :signed-long))
  572.    (:stack :signed-integer)
  573.    (:stack-trap #xAA5D :d0 (+ (ash 5 16) 4723) window becometarget whichfield))
  574.  
  575.  
  576. (deftrap _smpgetcomponentsize ((window (:pointer :grafport)) (whichmailer :signed-integer) (whichfield :signed-long) (size (:pointer :signed-integer)))
  577.    (:stack :signed-integer)
  578.    (:stack-trap #xAA5D :d0 (+ (ash 7 16) 4727) window whichmailer whichfield size))
  579.  
  580.  
  581. (deftrap _smpgetcomponentinfo ((window (:pointer :grafport)) (whichmailer :signed-integer) (whichfield :signed-long) (buffer :pointer))
  582.    (:stack :signed-integer)
  583.    (:stack-trap #xAA5D :d0 (+ (ash 7 16) 4728) window whichmailer whichfield buffer))
  584.  
  585.  
  586. (deftrap _smpgetlistiteminfo ((window (:pointer :grafport)) (whichmailer :signed-integer) (whichfield :signed-long) (buffer :pointer) (bufferlength :signed-long) (startitem :signed-integer) (itemcount (:pointer :signed-integer)) (nextitem (:pointer :signed-integer)) (more (:pointer :boolean)))
  587.    (:stack :signed-integer)
  588.    (:stack-trap #xAA5D :d0 (+ (ash 16 16) 4729) window whichmailer whichfield buffer bufferlength startitem itemcount nextitem more))
  589.  
  590.  
  591. (deftrap _smpimage ((window (:pointer :grafport)) (drawimageproc :pointer) (imagerefcon :signed-long) (supportscolor :boolean))
  592.    (:stack :signed-integer)
  593.    (:stack-trap #xAA5D :d0 (+ (ash 7 16) 4738) window drawimageproc imagerefcon supportscolor))
  594.  
  595.  
  596. (deftrap _smpgetnextletter ((typeslist (:pointer :ostype)) (numtypes :signed-integer) (adjacentletter (:pointer :letterdescriptor)))
  597.    (:stack :signed-integer)
  598.    (:stack-trap #xAA5D :d0 (+ (ash 5 16) 4742) typeslist numtypes adjacentletter))
  599.  
  600.  
  601. (deftrap _smpgetletterinfo ((mailboxspec (:pointer :letterspec)) (info (:pointer :smpletterinfo)))
  602.    (:stack :signed-integer)
  603.    (:stack-trap #xAA5D :d0 (+ (ash 4 16) 4746) mailboxspec info))
  604.  
  605. ; $ENDC                         ;  UsingOCEStandardMail 
  606.  
  607. ; $IFC NOT UsingIncludes
  608.  
  609. ; $ENDC
  610.  
  611. (export '($KSMPIMAGEERR $KSMPNEWPAGE $KSMPRESOLVETORECIPIENT $KSMPSENDLETTER
  612.           $KSMPSENDOPTIONSDIALOG $KSMPTAGDIALOG $KSMPGETLETTERINFO
  613.           $KSMPPREPARETOCHANGE $KSMPCLOSEOPTIONSDIALOG $KSMPPREPARETOCLOSE
  614.           $KSMPGETNEXTLETTER $KSMPINITMAILER $KSMPIMAGE $KSMPENUMERATEBLOCKS
  615.           $KSMPREADBLOCK $KSMPADDBLOCK $KSMPGETMAINENCLOSUREFSSPEC
  616.           $KSMPADDMAINENCLOSURE $KSMPGETFONTNAMEFROMLETTER $KSMPREADCONTENT
  617.           $KSMPADDCONTENT $KSMPGETLISTITEMINFO $KSMPGETCOMPONENTINFO
  618.           $KSMPGETCOMPONENTSIZE $KSMPATTACHDIALOG $KSMPCLEARUNDO
  619.           $KSMPGETTABINFO $KSMPBECOMETARGET $KSMPEXPANDORCONTRACT $KSMPENDSEND
  620.           $KSMPENDSAVE $KSMPCONTENTCHANGED $KSMPADDATTACHMENT $KSMPADDADDRESS
  621.           $KSMPSETFROMIDENTITY $KSMPSETSUBJECT $KSMPMOVEMAILER $KSMPDRAWMAILER
  622.           $KSMPOPENLETTER $KSMPBEGINSEND $KSMPBEGINSAVE $KSMPDRAWNTHCOVERPAGE
  623.           $KSMPPREPARECOVERPAGES $KSMPGETMAILERSTATE $KSMPMAILERREPLY
  624.           $KSMPMAILERFORWARD $KSMPMAILEREDITCOMMAND $KSMPMAILEREVENT
  625.           $KSMPDISPOSEMAILER $KSMPNEWMAILER $KSMPGETDIMENSIONS $KSMPSAVEACOPY
  626.           $KSMPSAVEAS $KSMPSAVE $KSMPSENDOPTIONSEND $KSMPSENDOPTIONSSTART
  627.           $KSMPSTANDARDINTERCHANGEMASK $KSMPIMAGEMASK $KSMPNATIVEMASK
  628.           $KSMPSTANDARDINTERCHANGEBIT $KSMPIMAGEBIT $KSMPNATIVEBIT
  629.           $KSMPMAILERUNDO $KSMPAPPMAYUNDO $KSMPUNDODISABLED
  630.           $KSMPSELECTALLCOMMAND $KSMPCLEARCOMMAND $KSMPPASTECOMMAND
  631.           $KSMPCOPYCOMMAND $KSMPCUTCOMMAND $KSMPUNDOCOMMAND $KSMPBCCADDRESS
  632.           $KSMPCCADDRESS $KSMPTOADDRESS $KSMPADDRESSOMATIC $KSMPATTACHMENTS
  633.           $KSMPSENDDATETIME $KSMPREGARDING $KSMPTO $KSMPFROM $KSMPOTHER
  634.           $KSMPDISPOSECOPYWINDOWMASK $KSMPCREATECOPYWINDOWMASK
  635.           $KSMPCURSOROVERMAILERMASK $KSMPAPPBECOMESTARGETMASK
  636.           $KSMPMAILERBECOMESTARGETMASK $KSMPEXPANDEDMASK $KSMPCONTRACTEDMASK
  637.           $KSMPAPPSHOULDIGNOREEVENTMASK $KSMPAPPMUSTHANDLEEVENTMASK
  638.           $KSMPDISPOSECOPYWINDOWBIT $KSMPCREATECOPYWINDOWBIT
  639.           $KSMPCURSOROVERMAILERBIT $KSMPAPPBECOMESTARGETBIT
  640.           $KSMPMAILERBECOMESTARGETBIT $KSMPEXPANDEDBIT $KSMPCONTRACTEDBIT
  641.           $KSMPAPPSHOULDIGNOREEVENTBIT $KSMPAPPMUSTHANDLEEVENTBIT
  642.           $KSMPSENDASIMAGEMASK $KSMPSENDFILEONLYMASK $KSMPSENDASENCLOSUREMASK
  643.           $KSMPSENDASIMAGEBIT $KSMPSENDFILEONLYBIT $KSMPSENDASENCLOSUREBIT
  644.           $FILTERIMAGECONTENT $FILTERAPPLELETTERCONTENT $FILTERANYLETTER
  645.           $TYPELETTERSPEC $KSMPVERSION $KSMPNATIVEFORMATNAME
  646.           $GESTALTSMPSPSENDLETTERVERSION $GESTALTSMPMAILERVERSION))
  647. (provide-interface 'OCEStandardMail)